package com.ruoyi.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.entity.GdCity;
import com.ruoyi.entity.WeatherData;
import com.ruoyi.mapper.GdCityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

@Service
public class GdCityService {
    @Autowired
    GdCityMapper gdCityMapper;
    public String getCityCodeByName(String cityName) {
        QueryWrapper<GdCity> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("city_name",cityName);
        GdCity gdCity = gdCityMapper.selectOne(queryWrapper);
        return gdCity.getAdCode();
    }
}
